<template>
	<view class="content">
		<!-- 空白页 -->
		<empty v-if="deposit_list.length === 0"></empty>
		<scroll-view class="list-scroll-content" scroll-y="true" @scrolltolower="getDepositList" style="height: 800px;">
		
		<!-- 运费模板列表 -->
		<view class="deposit-list-box">
			<view
				v-for="(item,index) in deposit_list" :key="index"
				class="deposit-list-item"
			>
				<view class="deposit-list-item-left">
					<view style="font-size: 32rpx;">零钱提现</view>
					<view>-{{item.money}}</view>
				</view>
				<view class="deposit-list-item-right">
					<view style="font-size: 32rpx;color: red;">{{item.status_name}}</view>
					<view class="deposit-date">{{item.apply_time}}</view>
				</view>
			</view>
		</view>
		<uni-load-more :status="loadingType"></uni-load-more>
		</scroll-view>
	</view>
</template> 

<script>

	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
	export default {
		components: {
			
		},
		data() {
			return {
				deposit_list:[],
				page: 1,
				loadingType: 'more',
			};
		},
		
		onLoad(options){
			uni.hideShareMenu()
		},
		onShow() {
			this.getDepositList()
		},
		methods: {
			navTo(url){
				uni.navigateTo({ url })
			}, 
			async getDepositList(){
				let deposit_list=[]
				let _this=this
				this.$http.sendRequest({
					url:"api/member_wallet/lists",
					method:"GET",
					data:{page:_this.page},
					success:function(res){
						deposit_list=res.data.data
						if(deposit_list.length>0){
							_this.deposit_list = _this.deposit_list.concat(deposit_list);
							_this.page++
						}else{
							_this.loadingType='nomore'
						}
					}
				})
			},
		},
	}
</script>

<style lang="scss">
	page, .content{
		background: $page-color-base;
		height: 100%;
	}
	.deposit-list-box{
		margin-top: 16upx;
		.deposit-list-item{
			height: 120upx;
			line-height: 60upx;
			background-color: #FFFFFF;
			margin-top: 16upx;
			.deposit-list-item-left{
				padding-left: 5%;
				width: 45%;
				float: left;
			}
			.deposit-list-item-right{
				width: 50%;
				float: right;
				.deposit-date{
					color: #606266;
					font-size: 24upx;
				}
			}
		}
	}
</style>
